package com.lgq.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
@Entity
public class Project {
	private int id;
	private String name;
	private Department department;
	private Date starttime;
	private double times;
	private boolean passflag;
	private String plan;
	private int neednumber;
	private College college;
	private Set<Projectselected> projectSelect=new HashSet<Projectselected>();
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@ManyToOne
	@JoinColumn(name="department")
	public Department getDepartment() {
		return department;
	}	
	public void setDepartment(Department department) {
		this.department = department;
	}
	public Date getStarttime() {
		return starttime;
	}
	public void setStarttime(Date starttime) {
		this.starttime = starttime;
	}
	public double getTimes() {
		return times;
	}
	public void setTimes(double times) {
		this.times = times;
	}
	public boolean isPassflag() {
		return passflag;
	}
	public void setPassflag(boolean passflag) {
		this.passflag = passflag;
	}
	public String getPlan() {
		return plan;
	}
	public void setPlan(String plan) {
		this.plan = plan;
	}
	public int getNeednumber() {
		return neednumber;
	}
	public void setNeednumber(int neednumber) {
		this.neednumber = neednumber;
	}
	@ManyToOne
	@JoinColumn(name="college")
	public College getCollege() {
		return college;
	}
	public void setCollege(College college) {
		this.college = college;
	}
	@OneToMany(mappedBy="student")
	public Set<Projectselected> getProjectSelect() {
		return projectSelect;
	}
	public void setProjectSelect(Set<Projectselected> projectSelect) {
		this.projectSelect = projectSelect;
	}	
}
